home *** CD-ROM | disk | FTP | other *** search
- # mkapps.nt: makefile for NT ADS application geomcal, util.obj, and
- # saget.obj
- #
- # This makefile builds the ADS application, geomcal, in the current directory.
- #
- # Use the batch file, mkapps.bat to run this makefile.
- #
- # **************************** NOTE ***************************************
- #
- # BEFORE RUNNING THIS MAKEFILE, YOU MUST SET UP THE FOLLOWING
- # ENVIRONMENT VARIABLES IN MKAPPS.BAT:
- #
- # 1 - Make sure that your path includes NT MSVC++ bin directory so
- # that the command line compiler, library manager, linker, and
- # make utility can be found.
- #
- # For example:
- # path=e:\msvcnt\bin;c:\winnt\system32;c:\winnt
- #
- # 2 - Replace ADSINC's path with your path to the ADS include files
- # directory. For example:
- #
- # set ADSINC=..
- #
- # 3 - Replace ADSLIB's path with your path to where the ADS kit files
- # reside. For example:
- #
- # set ADSLIB=..
- #
- # 4 - Make sure that the following environment variables exist. In the example
- # below you would replace "e:" with the drive on which you have installed
- # MSVC++ for NT:
- #
- # set Include=e:\msvcnt\include;e:\msvcnt\mfc\include;
- # set Lib=e:\msvcnt\lib;e:\msvcnt\mfc\lib
- #
- # If you don't want to compile with debug info specify "NODEBUG=1" as a
- # parameter to mkapps.bat, e.g., mkapps "NODEBUG=1"
- #
- # You may selectively build a module by specifying its name as
- # a parameter to mkapps.bat, e.g., mkapps saget
- # -or- mkapps saget "NODEBUG=1"
- #
- # *************************************************************************
- #
-
- # *************************************************************************
- # If the environment variables have not been set, use the default
- # values below:
- # *************************************************************************
-
- !IF "$(ADSINC)x" == "x"
- ADSINC=..
- !ENDIF
-
- !IF "$(ADSLIB)x" == "x"
- ADSLIB=..
- !ENDIF
-
- !include "$(MSVCDIR)\include\ntwin32.mak"
-
- # *************************************************************************
- # "VPATH" specifies the path where you want your object/output files to go.
- # This includes ".obj", ".lib", ".exp", ".map", ".def", and ".dll" files.
- # By default, "VPATH" specifies the current directory.
- # *************************************************************************
-
- VPATH=.
- ADSEXT=exe
- ads_lflags = $(guiflags)
- ads_llibs = $(guilibs)
-
-
- # *************************************************************************
- # "MAKEFILE" is the name of *this* makefile.
- # The name of this makefile is "mkapps.nt"
- # *************************************************************************
-
- MAKEFILE = mkapps.nt
-
- ADSXFLAGS = -nologo -I. -I$(ADSINC) -DWIN -DRADPACK
-
- # ADS kit files
- ADSLIBR = $(ADSLIB)\winads.lib
-
- ERRSTUFF = > $(@B).err 2>&1 && del $(@B).err || type $(@B).err
- # Uncomment the following line if you want to see compiler warnings
- # ERRSTUFF = > $(@B).err && type $(@B).err || type $(@B).err
-
- # The cc, cflags, cvarsdll, and cdebug macros come from ntwin32.mak
- COMP = $(cc) $(cflags) $(cvarsdll) $(cdebug) \
- -Fo$(VPATH)\ $(ADSXFLAGS)
-
- # geomcal objects
- CALOBJS = \
- $(VPATH)\cal.obj \
- $(VPATH)\calerr.obj \
- $(VPATH)\callex.obj \
- $(VPATH)\calexpr.obj \
- $(VPATH)\calmngf.obj \
- $(VPATH)\calstdf.obj \
- $(VPATH)\calusrf.obj \
- $(VPATH)\util.obj
-
- .SUFFIXES: .c .obj
-
- # Normal compile rule
- {.}.c{$(VPATH)}.obj:
- echo Compiling $(@B).c
- if exist $@ del $@
- $(COMP) -Tc$(@B).c $(ERRSTUFF)
-
-
- all: \
- $(VPATH)\geomcal.$(ADSEXT) \
- $(VPATH)\saget.obj \
- $(VPATH)\util.obj
-
-
- # Allow selective building. Eg "mksamp saget".
- geomcal: $(VPATH)\geomcal.$(ADSEXT)
- saget: $(VPATH)\saget.obj
- util: $(VPATH)\util.obj
-
- # Link program(s). Note: we just declare the dependencies
- # and let the built in rules handle things.
-
- $(VPATH)\geomcal.exe: $(CALOBJS) \
- $(ADSLIBR) $(MAKEFILE)
- @echo Linking $@
- $(MSVCDIR)\bin\link \
- -map:$*.map \
- -nodefaultlib \
- $(ads_lflags) \
- $(ads_llibs) \
- $(ldebug) \
- $(CALOBJS) $(ADSLIBR) \
- -out:$@ \
- $(ERRSTUFF)
-
- $(VPATH)\geomcal.exp: $(MAKEFILE)
- @echo Creating export library $@
- @echo ^# Automatically generated $@ for NT dll building > $*.def
- @echo LIBRARY $(@B) >> $*.def
- $(MSVCDIR)\bin\lib \
- -nologo \
- -def:$*.def \
- -machine:$(CPU) \
- $(CALOBJS) $(ADSLIBR) \
- -out:$*.lib \
- $(ERRSTUFF)
-
- $(VPATH)\geomcal.dll: $(CALOBJS) $(VPATH)\$(@B).exp \
- $(ADSLIBR) $(MAKEFILE)
- @echo Linking $@
- $(MSVCDIR)\bin\link \
- -dll \
- -base:0x20100000 \
- -map:$*.map \
- -nodefaultlib \
- $*.exp \
- $(ads_lflags) \
- $(ads_llibs) \
- $(ldebug) \
- $(CALOBJS) $(ADSLIBR) \
- -out:$@ \
- $(ERRSTUFF)
-
- {$(VPATH)}.obj{$(VPATH)}.exp:
- @echo Creating export library $@
- @echo ^# Automatically generated $@ for NT dll building > $*.def
- @echo LIBRARY $(@B) >> $*.def
- $(MSVCDIR)\bin\lib \
- -nologo \
- -def:$*.def \
- -machine:$(CPU) \
- $*.obj $(ADSLIBR) \
- -out:$*.lib \
- $(ERRSTUFF)
-
- # ADS program executeable
-
- {$(VPATH)}.obj{$(VPATH)}.dll:
- @echo Linking $@
- $(MSVCDIR)\bin\link \
- -dll \
- -base:0x20100000 \
- -map:$*.map \
- -nodefaultlib \
- $*.exp \
- $(ads_lflags) \
- $(ads_llibs) \
- $(ldebug) \
- $*.obj $(ADSLIBR) \
- -out:$@ \
- $(ERRSTUFF)
-
-
-